import { list } from "./testData.js";
export function apiGetAuditList({ pageNum = 1, pageSize = 10, idNumber = "330402199607050023" }) {
  return new Promise((resolve, reject) => {
    const res = {
      flag: true,
      data: {
        list: list.rows,
      },
      msg: "",
    };
    setTimeout(() => {
      resolve(res);
    }, 700);
  });
  // return handleApiCommon({
  //   methods: "get",
  //   options: {
  //     url: "/system/talentMain/listByPhone",
  //     params: {
  //       pageNum,
  //       pageSize,
  //       idNumber,
  //     },
  //   },
  //   successHandle: function (rdObj, res) {
  //     const { rows, total } = res;
  //     rdObj.setData({
  //       list: rows,
  //       total,
  //     });
  //   },
  // });
}
/**
 * @description: 审核通过
 * @param {*} id
 * @param {*} approState
 * @param {*} reviewOpinion
 * @return {*}
 */
export function apiConductAuditAdopt({ id, approState, reviewOpinion = "同意", signContract = null, payFee = null, checkIn = null }) {
  const data = { id, approState, reviewOpinion };
  if (!!signContract) {
    data.signContract = {
      signContract: JSON.stringify(signContract),
    };
  }
  if (!!payFee) {
    data.payFee = {
      payFeeJson: JSON.stringify(payFee),
    };
  }
  if (!!checkIn) {
    data.checkIn = {
      checkInJson: JSON.stringify(checkIn),
    };
  }
  console.log(data);
  // return handleApiCommon({
  //   methods: "post",
  //   options: {
  //     url: "/system/talentMain/approval",
  //     data,
  //   },
  // });
}
/**
 * @description: 驳回
 * @param {*} id
 * @param {*} approState
 * @param {*} rejectState
 * @param {*} rejectReason
 * @return {*}
 */
export function apiConductAuditReject({ id, approState, rejectState, rejectReason = "不同意" }) {
  // return handleApiCommon({
  //   methods: "post",
  //   options: {
  //     url: "/system/talentMain/reject",
  //     data: {
  //       id,
  //       approState,
  //       rejectState,
  //       rejectReason,
  //     },
  //   },
  // });
}
